Skip to content

Shortcut functions

Sascha edited this page Jan 14, 2024 · 41 revisions

There are shortcut functions available to run actions on your bot.

Please note that some shortcuts are not working on some models. This depends on the feature set of the device and also whether the function has been implemented (correctly) for the model.

Robot vacuum cleaner

Basic cleaning functions

vacbot.run("Clean"); // auto clean
vacbot.run("Clean_V2"); // auto clean for V2 models
vacbot.clean(); // version >= 0.6.2
const areas = "0,7"; // Example values
let boundaryCoordinates = "-3975,2280,-1930,4575"; // Example values
const numberOfCleanings = 1;
vacbot.run("SpotArea", "start", areas);
vacbot.spotArea(areas); // version >= 0.6.2
vacbot.run("CustomArea", "start", boundaryCoordinates, numberOfCleanings);
vacbot.customArea(boundaryCoordinates, numberOfCleanings); // version >= 0.6.2

Various control commands

vacbot.run("Charge"); // return to charging station
vacbot.charge(); // version >= 0.6.2
vacbot.run("Stop");
vacbot.stop(); // version >= 0.6.2
vacbot.run("Pause");
vacbot.pause(); // version >= 0.6.2
vacbot.run("Resume"); // resume if paused
vacbot.resume(); // version >= 0.6.2

Retrieve states

vacbot.run("GetCleanState"); // retrieve the cleaning status
vacbot.run("GetChargeState"); // retrieve the charging status
vacbot.run("GetBatteryState"); // retrieve the battery level
vacbot.run("GetSleepStatus"); // retrieve info if the vacuum is in sleeping mode

Cleaning log and consumable

vacbot.run("GetCleanLogs");
vacbot.run("GetCleanSum");
vacbot.run("GetLifeSpan"); // retrieve combined LifeSpan event
vacbot.run("GetLifeSpan", "main_brush"); // deprecated
vacbot.run("GetLifeSpan", "side_brush"); // deprecated
vacbot.run("GetLifeSpan", "filter"); // deprecated
vacbot.run("ResetLifeSpan", "main_brush");
vacbot.run("ResetLifeSpan", "side_brush");
vacbot.run("ResetLifeSpan", "filter");

Voice and sound

vacbot.run("PlaySound"); // soundID = 0 "startup music chime"
vacbot.run("PlaySound", 30);
vacbot.playSound(30); // version >= 0.6.2
// 950 type devices only
vacbot.run("GetVolume");
vacbot.run("SetVolume", 7); // value range: 0-10

Position

vacbot.run("GetPosition"); // retrieve current position of the vacuum
vacbot.run("GetChargerPos"); // retrieve charging position
vacbot.run("Relocate"); // send command to relocate position

Map data, spot areas and virtual boundaries

Please note: Some of the commands are classified as experimental for now (e.g. DeleteVirtualBoundary, GetMapImage)

const mapID = '1298761989'; // Example value
// Retrieve map data
vacbot.run("GetCachedMapInfo");
vacbot.run("GetMaps"); // GetMaps and GetCachedMapInfo are equal
// Retrieve spot areas
vacbot.run("GetSpotAreas", mapID);
// Retrieve virtual boundaries
vacbot.run("GetVirtualBoundaries", mapID);
// Retrieve various data for a spot area
vacbot.run("GetSpotAreaInfo", mapID, '0');
// Retrieve various data for a virtual boundary
const boundaryType = 'vw'; // vw = virtual wall, mw = no-mop-zone
vacbot.run("GetVirtualBoundaryInfo", mapID, '0', boundaryType);
// Delete a virtual boundary
vacbot.run("DeleteVirtualBoundary", mapID, '0', boundaryType);
// Add a virtual boundary
// boundaryCoordinates are passed as a string with a comma-separated
// list of boundaries (x, y pairs), formatted like an array.
boundaryCoordinates = "[-1072,-3142,-1072,-4240,1349,-4240,1349,-3142]"; // Example value
vacbot.run("AddVirtualBoundary", mapID, boundaryCoordinates, boundaryType);
Combined map data
// Retrieve combined map data including map data
vacbot.run("GetMaps", true);
vacbot.run("GetMaps", true, true);
// Retrieve combined map data without map image
vacbot.run("GetMaps", true, false);
Retrieve Map image data only
// Get image data for specified map
vacbot.run('GetMapImage', mapID, 'outline');
// Get image data for WiFi heat map
vacbot.run('GetMapImage', mapID, 'wifiHeatMap');

You can also use GetCachedMapInfo instead of GetMaps and GetMapInfo instead of GetMapImage

Vacuum power

vacbot.run("GetCleanSpeed"); // retrieve vacuum power value
vacbot.run("SetCleanSpeed", 2); // Power adjustment - value range 1-4 (but varies from model to model)

Mopping and water box

vacbot.run("GetWaterLevel"); // retrieve mopping water amount
vacbot.run("SetWaterLevel", 2); // Water level adjustment - value range 1-4
vacbot.run("GetWaterBoxInfo"); // indicates if water box is installed

Various other commands

vacbot.run('GetError'); // 950 type models and maybe some other models
vacbot.run("GetNetInfo"); // 950 type models and maybe some other models
vacbot.run("GetSchedule");
vacbot.run("DisableDoNotDisturb");
vacbot.run("EnableDoNotDisturb", "22:00", "08:00"); // 950 type models
vacbot.run("EnableDoNotDisturb"); // some other models
// 0 = off, 1 = on
vacbot.run("GetOnOff", "do_not_disturb");
vacbot.run("GetOnOff", "continuous_cleaning");
vacbot.run("GetOnOff", "silence_voice_report");
vacbot.run("SetOnOff", "do_not_disturb", 1);
vacbot.run("SetOnOff", "continuous_cleaning", 1);
vacbot.run("SetOnOff", "silence_voice_report", 1);
vacbot.run("GetAdvancedMode"); // 950 type models
vacbot.run("EnableAdvancedMode"); // 950 type models
vacbot.run("DisableAdvancedMode"); // 950 type models

Auto empty station

// 0 = disabled, 1 = enabled
vacbot.run("GetAutoEmpty"); // retrieve info if auto empty is enabled
vacbot.run("SetAutoEmpty", 1);

Manual control

// On some models, some commands are only executed once in a row by the Ecovacs API.
// You must first execute another command before the command can be executed the next time
vacbot.run("MoveBackward");
vacbot.run("MoveLeft");
vacbot.run("MoveRight");
vacbot.run("MoveForward");

Air Purifier

vacbot.run("SetUVCleaner", enable);
vacbot.run("SetHumidifierLevel", level, enable);
vacbot.run("SetFreshenerLevel", level, enable);
vacbot.run("SetAtmoLight", intensity);
vacbot.run("SetBlueSpeaker", enable);
vacbot.run("SetThreeModule", level, type, enable);
vacbot.run("SinglePoint_V2", spotCoordinates);
vacbot.run("Area_V2");
vacbot.run("SetMapSet_V2", mapArray);
vacbot.run("GetMapSet_V2");
vacbot.run("Clean_V2", mode, action);
vacbot.run("GetAirQuality");

Deprecated

vacbot.run("Edge");
vacbot.edge(); // version >= 0.6.2
vacbot.run("Spot");
vacbot.spot(); // version >= 0.6.2
vacbot.run("RenameSpotArea", '2', '0', "Dressing room") // works only with a few models (e.g. OZMO 930)

More or less full list of commands

  • AddMapVirtualBoundary
  • Charge
  • Clean
  • Clean_V2
  • CustomArea
  • CustomArea_V2
  • DeleteMapVirtualBoundary
  • Drying
  • EmptyDustBin
  • EmptyDustBinSA
  • GetAICleanItemState
  • GetAIMap
  • GetAdvancedMode
  • GetAirDrying
  • GetAreaPoint
  • GetAutoEmpty
  • GetBatteryState
  • GetBorderSpin
  • GetCachedMapInfo
  • GetCarpetInfo
  • GetCarpetPressure
  • GetChargeState
  • GetCleanCount
  • GetCleanLogs
  • GetCleanPreference
  • GetCleanSpeed
  • GetCleanState
  • GetCleanState_V2
  • GetCleanSum
  • GetContinuousCleaning
  • GetCustomAreaMode
  • GetDoNotDisturb
  • GetDusterRemind
  • GetError
  • GetLifeSpan
  • GetLiveLaunchPwdState
  • GetMajorMap
  • GetMapInfo
  • GetMapInfo_V2
  • GetMapInfo_V2_Yeedi
  • GetMapSet
  • GetMapSet_V2
  • GetMapSpotAreaInfo
  • GetMapSpotAreas
  • GetMapSpotAreas_V2
  • GetMapState
  • GetMapTrace
  • GetMapTrace_V2
  • GetMapVirtualBoundaries
  • GetMapVirtualBoundaries_V2
  • GetMapVirtualBoundaryInfo
  • GetMinorMap
  • GetMultiMapState
  • GetNetInfo
  • GetPosition
  • GetRecognization
  • GetSchedule
  • GetSchedule_V2
  • GetSleepStatus
  • GetStationInfo
  • GetStationState
  • GetSweepMode
  • GetTrueDetect
  • GetVoiceAssistantState
  • GetVolume
  • GetWashInfo
  • GetWashInterval
  • GetWaterInfo
  • GetWorkMode
  • HostedCleanMode
  • MapPoint_V2
  • Move
  • MoveBackward
  • MoveForward
  • Pause
  • PlaySound
  • Relocate
  • ResetLifeSpan
  • Resume
  • SetAdvancedMode
  • SetAirDrying
  • SetAutoEmpty
  • SetBorderSpin
  • SetCarpetInfo
  • SetCarpetPressure
  • SetCleanCount
  • SetCleanPreference
  • SetCleanSpeed
  • SetContinuousCleaning
  • SetCustomAreaMode
  • SetDoNotDisturb
  • SetDusterRemind
  • SetMapSet
  • SetMapSet_V2
  • SetRecognization
  • SetSweepMode
  • SetTrueDetect
  • SetVoiceAssistantState
  • SetVolume
  • SetWashInfo
  • SetWashInterval
  • SetWaterLevel
  • SetWorkMode
  • SpotArea
  • SpotArea_V2
  • Stop
  • Washing

// Air Purifier specific (e.g. AIRBOT Z1)

  • Area_V2
  • BasicPurification
  • GetAirQuality
  • GetAirbotAutoModel
  • GetAngleFollow
  • GetAtmoLight
  • GetAtmoVolume
  • GetAutonomousClean
  • GetBlueSpeaker
  • GetChildLock
  • GetDrivingWheel
  • GetHumanoidFollow
  • GetJCYAirQuality
  • GetMic
  • GetMonitorAirState
  • GetOta
  • GetRelocationState
  • GetScene
  • GetThreeModule
  • GetThreeModuleStatus
  • GetTimeZone
  • GetTotalStats
  • GetVoiceLifeRemindState
  • GetVoiceSimple
  • GetWifiList
  • MobilePurification
  • SetAirbotAutoModel
  • SetAngleFollow
  • SetAtmoLight
  • SetAtmoVolume
  • SetAutonomousClean
  • SetBlueSpeaker
  • SetChildLock
  • SetFanSpeed
  • SetFreshenerLevel
  • SetHumidifierLevel
  • SetMic
  • SetMonitorAirState
  • SetThreeModule
  • SetUVCleaner
  • SetVoice
  • SetVoiceSimple
  • SinglePoint_V2
  • SpotPurification

// Deprecated

  • Edge
  • Spot
  • MoveLeft
  • MoveRight
  • MoveTurnAround